<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户密码修改</title>
		<link type="text/css" rel="stylesheet" href="css/table.css">
		<link type="text/css" rel="stylesheet" href="css/table.css" />
		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript">
	function savePsw(){
		var password=$("#password").val();
		var userId=$("#userId").val();
		if($.trim(password)==''||$.trim(password)=='null'){
			$("#passwordinfo").html("<img src=\"image/cuo.gif\" width=\"16\" height=\"16\" />&nbsp;<font color=\"#FF0000\">账户不能为空！</font>");
			return;
		}else{
			$("#passwordinfo").html("");
		}
		var param={"userId":userId,"psw":password};
		$.post("updatePsw.action",param,function(data){
			if(data=='success'){
				alert("密码修改成功!");
				window.close();
			}else{
				alert("密码修改失败!");
			}
		});
	}
</script>
	</head>
	<body>
	<table align="center" border="0" cellpadding="0" cellspacing="0"
			width="98%">
			<tbody>
				<tr>
					<td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
					<td style="background: url('image/wsoa_window_002.gif');">
						<table border="0" cellpadding="0" cellspacing="0">
							<tbody>
								<tr>
									<td align="center"
										style="background: url('image/wsoa_window_002.gif');"
										width="10">
										<img src="image/center_19.gif">
									</td>
									<td align="center"
										style="background: url('image/wsoa_window_002.gif');"></td>
									<td>
										系统管理 &gt; 基础设置 &gt; 用户管理 &gt; 密码修改
									</td>
								</tr>
							</tbody>
						</table>
					</td>
					<td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
				</tr>
				<tr>
					<td style="background: url('image/wsoa_window_010.gif');" width="1">
						&nbsp;
					</td>
					<td>
	
		<input type="hidden" id="userId" value="${user.id}">
		<table align="center" id="tabllist" style="width:600px;height: 100px" class="table5" frame="box">
			<tr class="reigh_list2">
				<td colspan="2" align="center">
					密码修改
				</td>
			</tr>
			<tr>
				<td class="table5 bgcolor5" align="right" width="100">
					帐号：
				</td>
				<td class="table5">
					<input type="text" id="account" name="user.account"
						value="${user.account}" readonly="readonly" />
				</td>
			</tr>
			<tr>
				<td class="table5 bgcolor5"  align="right" >
					新密码：
				</td>
				<td class="table5">
					<input value="${psw}" type="text" name="psw" id="password"
						maxlength="15" />
					<span id="passwordinfo"></span>
				</td>
			</tr>
			<tr>
				<td align="center" colspan="2">
					<input type="button" onclick="savePsw()" class="button_04" value="保存" />
					&nbsp;&nbsp;
					<input type="button" onclick="window.close()" class="button_04" value="关闭" />
				</td>
			</tr>
		</table>
		
		</td>
					<td style="background: url('image/wsoa_window_006.gif');" width="1">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td height="1" width="1">
						<img src="image/wsoa_window_009.gif" height="16" width="14">
					</td>
					<td style="background: url('image/wsoa_window_008.gif');"
						height="1"></td>
					<td height="1" width="1">
						<img src="image/wsoa_window_007.gif" height="16" width="12">
					</td>
				</tr>
			</tbody>
		</table>
	</body>
</html>